class Solution:
    def translateNum(self, num: int) -> int:
        string = str(num)
        dp = [0 for _ in range(len(string)+1)]
        dp[0] = 1
        dp[1] = 1
        for i in range(2, len(string)+1):
            if string[i-2:i]>="10" and string[i-2:i]<="25":
                dp[i] = dp[i-1] + dp[i-2]
            else:
                dp[i] = dp[i-1]
        return dp[len(string)]